package com.itrustsolution.rms.entities;
// Generated 25 Mei 11 22:19:57 by Hibernate Tools 3.2.1.GA


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * RmsProduct generated by hbm2java
 */
@Entity
@Table(name="rms_product"
    ,catalog="rms"
)
public class RmsProduct  implements java.io.Serializable {


     private Integer productId;
     private RmsProductType rmsProductType;
     private RmsClientDept rmsClientDept;
     private RmsClient rmsClient;
     private String productName;
     private String productInformation;
     private boolean productIsactive;
     private boolean productIsdeleted;
     private Date productCreateDate;
     private int productCreateBy;
     private Set<TckTicket> tckTickets = new HashSet(0);

    public RmsProduct() {
    }

	
    public RmsProduct(RmsProductType rmsProductType, RmsClientDept rmsClientDept, RmsClient rmsClient, String productName, boolean productIsactive, boolean productIsdeleted, Date productCreateDate, int productCreateBy) {
        this.rmsProductType = rmsProductType;
        this.rmsClientDept = rmsClientDept;
        this.rmsClient = rmsClient;
        this.productName = productName;
        this.productIsactive = productIsactive;
        this.productIsdeleted = productIsdeleted;
        this.productCreateDate = productCreateDate;
        this.productCreateBy = productCreateBy;
    }
    public RmsProduct(RmsProductType rmsProductType, RmsClientDept rmsClientDept, RmsClient rmsClient, String productName, String productInformation, boolean productIsactive, boolean productIsdeleted, Date productCreateDate, int productCreateBy, Set tckTickets) {
       this.rmsProductType = rmsProductType;
       this.rmsClientDept = rmsClientDept;
       this.rmsClient = rmsClient;
       this.productName = productName;
       this.productInformation = productInformation;
       this.productIsactive = productIsactive;
       this.productIsdeleted = productIsdeleted;
       this.productCreateDate = productCreateDate;
       this.productCreateBy = productCreateBy;
       this.tckTickets = tckTickets;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="PRODUCT_ID", unique=true, nullable=false)
    public Integer getProductId() {
        return this.productId;
    }
    
    public void setProductId(Integer productId) {
        this.productId = productId;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="PRODUCT_TYPE_ID", nullable=false)
    public RmsProductType getRmsProductType() {
        return this.rmsProductType;
    }
    
    public void setRmsProductType(RmsProductType rmsProductType) {
        this.rmsProductType = rmsProductType;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="CLIENT_DEPT_ID", nullable=false)
    public RmsClientDept getRmsClientDept() {
        return this.rmsClientDept;
    }
    
    public void setRmsClientDept(RmsClientDept rmsClientDept) {
        this.rmsClientDept = rmsClientDept;
    }
    
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="CLIENT_ID", nullable=false)
    public RmsClient getRmsClient() {
        return this.rmsClient;
    }
    
    public void setRmsClient(RmsClient rmsClient) {
        this.rmsClient = rmsClient;
    }
    
    @Column(name="PRODUCT_NAME", nullable=false, length=100)
    public String getProductName() {
        return this.productName;
    }
    
    public void setProductName(String productName) {
        this.productName = productName;
    }
    
    @Column(name="PRODUCT_INFORMATION", length=100)
    public String getProductInformation() {
        return this.productInformation;
    }
    
    public void setProductInformation(String productInformation) {
        this.productInformation = productInformation;
    }
    
    @Column(name="PRODUCT_ISACTIVE", nullable=false)
    public boolean isProductIsactive() {
        return this.productIsactive;
    }
    
    public void setProductIsactive(boolean productIsactive) {
        this.productIsactive = productIsactive;
    }
    
    @Column(name="PRODUCT_ISDELETED", nullable=false)
    public boolean isProductIsdeleted() {
        return this.productIsdeleted;
    }
    
    public void setProductIsdeleted(boolean productIsdeleted) {
        this.productIsdeleted = productIsdeleted;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="PRODUCT_CREATE_DATE", nullable=false, length=19)
    public Date getProductCreateDate() {
        return this.productCreateDate;
    }
    
    public void setProductCreateDate(Date productCreateDate) {
        this.productCreateDate = productCreateDate;
    }
    
    @Column(name="PRODUCT_CREATE_BY", nullable=false)
    public int getProductCreateBy() {
        return this.productCreateBy;
    }
    
    public void setProductCreateBy(int productCreateBy) {
        this.productCreateBy = productCreateBy;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="rmsProduct")
    public Set<TckTicket> getTckTickets() {
        return this.tckTickets;
    }
    
    public void setTckTickets(Set<TckTicket> tckTickets) {
        this.tckTickets = tckTickets;
    }




}


